package dmp.filter10;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

public class Filter10Mapper extends Mapper<LongWritable, Text, Text, Text> {
	private Map<String, String> map = new HashMap<>();

	@Override
	protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
		String line = value.toString();
		String[] words = line.split("\\|");
		if (words.length != 40) {
			return;
		}
		String imsi = words[0];
		String phone = words[1];
		String SAI = words[11];
		String TAI = words[12];
		if (imsi.equals("02DA8E3456910B38DD1CBC4A18500CB5"))
			context.write(new Text(imsi), value);
	}

}
